//
//  PTBasePageHeaderView.h
//  PlushGame
//
//  Created by aron on 2017/11/23.
//  Copyright © 2017年 aron. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, PTPageHeaderStyle) {
    PTPageHeaderStyleDefault = 0,
};

@protocol PTPageHeaderViewDelegate, PTPageHeaderViewDataSource;

@interface PTBasePageHeaderView : UIView

@property (assign, nonatomic) PTPageHeaderStyle headerStyle;
@property (nonatomic, weak) id<PTPageHeaderViewDelegate> delegate;
@property (nonatomic, weak) id<PTPageHeaderViewDataSource> dataSource;

- (void)moveToIndex:(NSInteger)index;
- (void)animateMoveToOffset:(CGFloat)offset;

- (void)reloadData;

- (NSInteger)currentIndex;

@end


//______________________________________________________________________________________________________________

@protocol PTPageHeaderViewDelegate <NSObject>

- (void)headerView:(PTBasePageHeaderView *)headerView didSelectItemAtIndex:(NSInteger)index;

@end


//_______________________________________________________________________________________________________________

@protocol PTPageHeaderViewDataSource <NSObject>

@required

- (NSInteger)numberOfItemsInHeaderView:(PTBasePageHeaderView *)headerView;

@optional
- (UIView *)pageView:(PTBasePageHeaderView *)headerView headerItemViewAtIndex:(NSInteger)index;
- (id)pageView:(PTBasePageHeaderView *)headerView headerItemAtIndex:(NSInteger)index;

@end


